<?php

namespace BlogBundle\Controller;

use BaseBundle\Controller\BaseController;
use BaseBundle\Form\Task;
use Prophecy\Doubler\Generator\ClassCreator;
use Symfony\Bundle\FrameworkBundle\Controller\Controller;
use Symfony\Component\HttpFoundation\JsonResponse;
use Symfony\Component\HttpFoundation\Request;


class DefaultController extends BaseController
{
    public function indexAction(Request $request)
    {
//        $request->request->set('name','张三');
////        $request->request->set('age','18');
//        $task = new Task();
//        $task->setAge($request->request->get('age'));
//        $task->setName($request->request->get('name'));
//        self::$error->validate($task);
//        if (self::$error->getErrors()){
//            return $this->response(self::$error->getError(),0,['info'=>[]]);
//        }

//        return $this->render('BlogBundle::index.html.twig',[]);
        return $this->render('BlogBundle::detail.html.twig',[]);
    }
}
